from django.shortcuts import render
from rest_framework.response import Response
from rest_framework.views import APIView
from api.authentications import MyAuth
from api.models import User
from api.permission import MyPermission
from api.throttle import SendMessageRate


class UserAPIView(APIView):
    authentication_classes = [MyAuth]
    permission_classes = [MyPermission]
    throttle_classes = [SendMessageRate]

    def get(self, request, *args, **kwargs):
        return Response('读请求')

    def post(self, request, *args, **kwargs):
        return Response('写请求')
